package com.se.config;

import java.util.List;

import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;

public class ConfigUtil implements ApplicationContextAware {
	private static ApplicationContext ctx;
	private static Preferences preferences;

	public void setApplicationContext(ApplicationContext paramApplicationContext) throws BeansException {
		ctx = paramApplicationContext;
	}

	public static Object getObject(String paramString) {
		preferences = (Preferences) ctx.getBean("config");
		return preferences.get(paramString);
	}

	public static Object getObject(String paramString, Object paramObject) {
		preferences = (Preferences) ctx.getBean("config");
		return preferences.get(paramString, paramObject);
	}

	public static String getString(String paramString) {
		preferences = (Preferences) ctx.getBean("config");
		return preferences.getString(paramString);
	}

	public static String getString(String paramString1, String paramString2) {
		preferences = (Preferences) ctx.getBean("config");
		return preferences.getString(paramString1, paramString2);
	}

	public static int getInt(String paramString) {
		preferences = (Preferences) ctx.getBean("config");
		return preferences.getInt(paramString);
	}

	public static int getInt(String paramString, int paramInt) {
		preferences = (Preferences) ctx.getBean("config");
		return preferences.getInt(paramString, paramInt);
	}

	public static boolean getBoolean(String paramString) {
		preferences = (Preferences) ctx.getBean("config");
		return preferences.getBoolean(paramString);
	}

	public static boolean getBoolean(String paramString, boolean paramBoolean) {
		preferences = (Preferences) ctx.getBean("config");
		return preferences.getBoolean(paramString, paramBoolean);
	}

	public static double getDouble(String paramString) {
		preferences = (Preferences) ctx.getBean("config");
		return preferences.getDouble(paramString);
	}

	public static double getDouble(String paramString, double paramDouble) {
		preferences = (Preferences) ctx.getBean("config");
		return preferences.getDouble(paramString, paramDouble);
	}

	public static long getLong(String paramString) {
		preferences = (Preferences) ctx.getBean("config");
		return preferences.getLong(paramString);
	}

	public static long getLong(String paramString, long paramLong) {
		preferences = (Preferences) ctx.getBean("config");
		return preferences.getLong(paramString, paramLong);
	}

	public static List getKeyList(String paramString) {
		preferences = (Preferences) ctx.getBean("config");
		return preferences.getKeyList(paramString);
	}
}

/*
 * Location:
 * D:\DevApp\workspace\DevKsnetWeb9.3\WebContent\WEB-INF\lib\netville-2.2.3.jar
 * Qualified Name: netville.config.ConfigUtil JD-Core Version: 0.6.2
 */